// 路由中间件函数抽离为controller

// 获取用户资料
exports.getProfile = async (req,res, next) => {
    try {
        // 处理请求
        res.send('get /profile/:username')
    } catch (err) {
        next(err)
    }
}

// 关注用户
exports.followUser = async (req,res, next) => {
    try {
        // 处理请求
        res.send('post /profile/:username/follow')
    } catch (err) {
        next(err)
    }
}

// 取消关注用户
exports.unfollowUser = async (req,res, next) => {
    try {
        // 处理请求
        res.send('delete /profile/:username/follow')
    } catch (err) {
        next(err)
    }
}
